<template>
  <el-card>
    <template #header>
      <div class="clearfix">
        <span>组团列表</span>
        <el-button @click="router.push('/home/partner/investors/add')" style="float: right; padding: 3px 0" type="text">添加</el-button>
      </div>
    </template>
    <el-table :data="blockList" style="width: 100%">
      <el-table-column prop="sequence_number" label="序号">
        <template #default="scope">
          <input type="checkbox" v-model="scope.row.selected" />
        </template>
      </el-table-column>
      <el-table-column prop="groupName" label="团组名称" ></el-table-column>
      <el-table-column prop="groupType" label="所属类型"></el-table-column>
      <el-table-column prop="duration" label="时限" ></el-table-column>
      <el-table-column prop="participantCount" label="参团人员数" ></el-table-column>
      <el-table-column prop="publishStatus" label="发布状态" ></el-table-column>
      <el-table-column prop="groupStatus" label="组团状态" ></el-table-column>
      <el-table-column prop="publishTime" label="发布时间" ></el-table-column>
    </el-table>
  </el-card>
</template>

<script setup lang="ts">
import { ref } from 'vue';
import { fetchBlockList } from "../../../../api/BlockApi.ts";
import router from "../../../../router";

const blockList = ref([]);

const getBlockList = async () => {
  const res = await fetchBlockList();
  if (res.code === 200) {
    blockList.value = res.data
  }
};


getBlockList();

</script>

<style scoped>
.el-card {
  margin-top: 20px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 0 0 #ffffff;
  outline: 0;
}
</style>
